<template>
  <div>
    <swiper :options="swiperOption" class="czp">
      <swiper-slide v-for="index in 6" :key="index">
        <img :src="dataList.cover" alt="" />
      </swiper-slide>

      <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>
import "swiper/dist/css/swiper.css";
import { swiper, swiperSlide } from "vue-awesome-swiper";
export default {
  props: {
    dataList: {
      type: Object,
      default() {
        return [];
      },
    },
  },
  mounted() {},
  data() {
    return {
      swiperOption: {
        pagination: {
          el: ".swiper-pagination",
          clickable: true,
        },
        autoplay: {
          delay: 1500,
          stopOnLastSlide: false,
          disableOnInteraction: true,
        }, // 可选选项，自动滑动
      },
    };
  },
  components: {
    swiper,
    swiperSlide,
  },
};
</script>

<style scoped>
img {
  width: 100%;
  height: 8.8rem;
}
</style>